<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
       div {
           text-transform: capitalize;
       }
    </style>
</head>
<body>
    <div></div>
    <input type="text" class="text"><button>提交</button>
    <script>
        // var btn = document.querySelector("button");
        // var inputEle = document.querySelector("input");
        // var reg = /^[0-9]*{5-9}+@qq\.com$/g;
        // btn.onclick = function () {
        //     var str = inputEle.value ; 
        //     var res = reg.test(str) ;
        //     var res1 = reg.exec(str);
        //     console.log(res,res1,reg);
        // }
        var n = "miao wei ke tang".indexOf("wei");
        console.log(n);
    </script>
</body>
</html>
